#ifndef MESSAGETYPE_H
#define MESSAGETYPE_H
//定义通信的的类型
#include<QByteArray>
#include<QList>
#include<QMap>
//操作数据库的信息类型
#define PATIENTUSRDATABASE "patientusr"
#define DOCTORUSRDATABASE "doctorusr"
#define DEPARTMENTDATABASE "department"
#define HEALTHASSESSMENTDATABASE "healthassessment"
#define MEDICIALRECDATABASE "medicialrec"
#define REGISTRATIONDATABASE "registration"
#define PRESCRIPTIONDATABASE "prescription"
#define DOCTORINFO "doctorinfo"
//消息的发送和接收方
#define DOCTORMESSAGE "DOCTOR"
#define PATIENTMESSAGE "PATIENT"
//医生和患者之间进行交流
#define COMMUNICATE  "COMMUNICATE"
//处理数据库的操作类型
#define SELECT 1
#define INSERT 2
#define DELETE 3
#define UPDATE 4
//转换函数
//QMap 转化为 QByeteArray
QByteArray mapToByteArrayCustom(const QMap<QString, QString>& map);
//QByeteArray 转化为 QMap;
QMap<QString, QString> byteArrayToMapCustom(const QByteArray& byteArray);
//QMap数组转化成 QByteArray
QByteArray convertQMapArrayToByteArrayCustom(const QList<QMap<QString, QString> > &mapArray);
//将QByteArray转化为QMap数组
QList<QMap<QString, QString> > convertByteArrayToQMapArrayCustom(const QByteArray &byteArray);
#endif // MESSAGETYPE_H
